<?php
namespace App\Models\Admin;

class AdminLogModel extends BaseModel
{
    /**
     * 管理员登陆日志
     */

    protected $table = 'auth_admin_log';
    protected $fillable = [
        'id','admin','loginTime','logoutTime',
    ];

    public function getAdminName()
    {
        $model = AdminModel::find($this->admin);
        return $model ? $model->name : '';
    }

    public function loginTime()
    {
        return $this->loginTime ? date('Y-m-d H:i',$this->loginTime) : '';
    }
}